Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

High-Level Routines

The Movie Toolbox includes support for progressive downloads, which allow part of a movie to be displayed before all of its data has been received over a network or other slow link. Applications that use the movie controller component provided by Apple automatically get support for progressive downloads. Applications that do not use the standard move controller can use the two high-level functions for progressive downloads described in this section, QTMovieNeedsTimeTable and GetMaxLoadedTimeInMovie , to determine whether a movie is being progressively downloaded and, if so, to see how much of it has already been downloaded.

GetMaxLoadedTimeInMovie

When a movie is being progressively downloaded, the GetMaxLoadedTimeInMovie function returns the duration of the part of a movie that has already been downloaded.

pascal OSErr GetMaxLoadedTimeInMovie (
                     Movie theMovie,
                     TimeValue *time);
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such toolbox functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .

time
The duration of the part of a movie that has already been downloaded. This time value is expressed in the movie's time coordinate system.

DISCUSSION

If all of a movie has been downloaded, the GetMaxLoadedTimeInMovie function returns the duration of the entire movie.

The toolbox creates a time table for a movie when either QTMovieNeedsTimeTable or GetMaxLoadedTimeInMovie is called for the movie, but the time table is used only by the toolbox and is not accessible to applications. The toolbox disposes of the time table when the download is complete.

QTMovieNeedsTimeTable

The QTMovieNeedsTimeTable function returns whether a movie is being progressively downloaded.

pascal OSErr QTMovieNeedsTimeTable (
                     Movie theMovie,
                     Boolean *needsTimeTable);
theMovie
Specifies the movie for this operation. Your application obtains this identifier from such toolbox functions as NewMovie , NewMovieFromFile , and NewMovieFromHandle .

needsTimeTable
If true , the movie is being progressively downloaded. If an error occurs, this parameter is set to false .

DISCUSSION

A movie can be progressively downloaded when its data is received over a network connection or other slow data channel. Progressive downloads are not necessary when the data for the movie is on a local disk.

The toolbox creates a time table for a movie when either QTMovieNeedsTimeTable or GetMaxLoadedTimeInMovie is called for the movie, but the time table is used only by the toolbox and is not accessible to applications. The toolbox disposes of the time table when the download is complete.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |